package com.heima.hello.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@ConfigurationProperties(prefix = "email")
public class EmailConfig {

    // @Value("${email.user}")
    private String user;

    // @Value("${email.code}")
    private String code;

    // @Value("${email.smt}")
    private String smt;

    // @Value("${email.auth}")
    private boolean auth;

    private List<String> hobbies;

    public List<String> getHobbies() {
        return hobbies;
    }

    public void setHobbies(List<String> hobbies) {
        this.hobbies = hobbies;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getSmt() {
        return smt;
    }

    public void setSmt(String smt) {
        this.smt = smt;
    }

    public boolean isAuth() {
        return auth;
    }

    public void setAuth(boolean auth) {
        this.auth = auth;
    }

    @Override
    public String toString() {
        return "EmailConfig{" +
                "user='" + user + '\'' +
                ", code='" + code + '\'' +
                ", smt='" + smt + '\'' +
                ", auth=" + auth +
                ", hobbies=" + hobbies +
                '}';
    }
}
